<?php

namespace App\Http\Controllers\Admin\Index;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Session;
use App\Model\Articles;

class IndexController extends Controller
{   
    /**
     * 加载后台首页
     * @return 后台首页页面
     */
    public function index()
    {
        return view('Admin/Index/index');
    }
    

    

    public function test(Request $request)
    {   
        //获取文章的原来模型
        $articleModel = Articles::find(1);
        $html = $articleModel->html;

        preg_match_all('/src=\"(.*?)\"/', $html, $match);

        dd($match);

        // dd(Redis::get('test'));
        // session(['uploadPic' => ['123', '890'] ]);
        // dd(Redis::get('laravel:3zHyoXozJbV6sLxMKWYQfkICK5iLduHwHOLWpJFX'));
        // dd(Session::getId()) ;
        // dd(Redis::sMembers('uploadpic:sessionID:' . Session::getId()));
        // dd(Session::get('uploadPic'));
        // return session('uploadPic');
        // return Redis::get('test');
        // return view('Admin/Articles/list');
    }




}
